package com.perceptivesoftware.licensing.client.dialogs.useradmin.plugin.user;

import com.perceptivesoftware.licensing.client.dialogs.useradmin.plugin.SecurityManagerNavItem;

public class UserNavItem extends SecurityManagerNavItem {

	private String userCode;
	private String roleCode;
	private Boolean isSuperAdmin;

	private UserNavItem() {
		super(null);
	}

	public UserNavItem(final String name, final String userCode, final String roleCode, final Boolean isSuperAdmin) {
		super(name);
		this.userCode = userCode;
		this.roleCode = roleCode;
		this.isSuperAdmin = isSuperAdmin;
	}

	public String getUserCode() {
		return userCode;
	}

	@SuppressWarnings("unused")
	// For serialization
	private void setUserCode(final String userCode) {
		this.userCode = userCode;
	}

	public String getRoleCode() {
		return roleCode;
	}

	@SuppressWarnings("unused")
	// For serialization
	private void setRoleCode(final String roleCode) {
		this.roleCode = roleCode;
	}

	@Override
	public String getToolTip() {
		return "User Code: " + userCode;
	}

	public void setIsSuperAdmin(Boolean isSuperAdmin) {
		this.isSuperAdmin = isSuperAdmin;
	}

	public Boolean getIsSuperAdmin() {
		return isSuperAdmin;
	}
}
